<template>
	<ul>
		<li v-for="things in things" :key="things.id" @click="things.done = !things.done">
			<input type="checkbox" :checked="things.done">
			{{things.title}}
			<button @click="del(things.id)">删除</button>
		</li>
		
	</ul>
</template>

<script>
export default {
		name:'MyList',
		data() {
			return {
				
			}
		},
		props:['things'],
		methods: {
			del(id){
				// console.log(id)

				this.$emit('del',id)
			}
		},
	}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
	
</style>
